<template>
	<view class="">
		<view class="nav" :style="`padding-top: ${statusBarHeight}px;`">
			<text>妙有芯思惟</text>
			<image src="@/static/course/bg.png" mode=""></image>
		</view>
		<view class="name">
			{{userInfo.nickname}}
		</view>
		<view class="list">
			<navigator url="./target/target">
				<view class="col">
					<view class="item">
						<image src="/static/course/list-icon1.png" mode=""></image> 我的目标
					</view>
					<image class="arrow" src="@/static/arrow-right.png" mode=""></image>
				</view>
			</navigator>
			<navigator url="./quality/quality">
				<view class="col">
					<view class="item">
						<image src="/static/course/list-icon2.png" mode=""></image> 精品课程
					</view>
					<image class="arrow" src="@/static/arrow-right.png" mode=""></image>
				</view>
			</navigator>
			<navigator url="./series/series">
				<view class="col">
					<view class="item">
						<image src="/static/course/list-icon3.png" mode=""></image> 系列课程
					</view>
					<image class="arrow" src="@/static/arrow-right.png" mode=""></image>
				</view>
			</navigator>
			<!-- <navigator url="./customized/index">
				<view class="col">
					<view class="item">
						<image src="/static/course/list-icon4.png" mode=""></image> 私人定制
					</view>
					<image class="arrow" src="@/static/arrow-right.png" mode=""></image>
				</view>
			</navigator> -->
		</view>
		<!-- 	<view class="learning">
			<navigator url="./learning/index">
				<view class="item">
					现在在学 <image class="arrow" src="@/static/arrow-right.png" mode=""></image>
				</view>
				<image class="banner" src="../../static/loading.png" mode="widthFix"></image>
				<view class="text">
					人工智能，计算机编程应用...
				</view>
			</navigator>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight: uni.getStorageSync("statusBarHeight"),
				userInfo:{},
			}
		},
		onLoad() {
				this.getInfo()
			},
		methods: {
				getInfo() {
					this.$post("/user/info").then(res => {
						this.userInfo = res.data.userInfo
					})
				}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #35CBAD;
	}

	.nav {
		background: linear-gradient(180deg, rgba(117, 249, 253, 1) 0%, rgba(3, 173, 11, 1) 100%);
		height: 320rpx;
		display: flex;
		align-items: center;
		position: relative;

		text {
			position: absolute;
			z-index: 9;
			font-weight: bold;
			color: #fff;
			font-size: 56rpx;
			left: 30rpx;
		}

		image {
			width: 220rpx;
			height: 220rpx;
			margin-left: 100rpx;
		}
	}

	.name {
		padding: 12rpx 30rpx;
		font-size: 36rpx;
		font-weight: bold;
		color: #fff;
	}

	.list {
		background-color: #91E9E7;
		border-radius: 20rpx;
		padding: 20rpx 0;

		.col {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx 30rpx;

			.item {

				image {
					width: 56rpx;
					height: 56rpx;
					margin-right: 10rpx;
				}

				display: flex;
				align-items: cell;
			}

			.arrow {
				width: 32rpx;
				height: 32rpx;
			}
		}
	}

	.learning {
		position: relative;

		&::before {
			content: "";
			background-color: #fff;
			width: 100%;
			height: 70%;
			position: absolute;
			border-radius: 40rpx 40rpx 0 0;
		}

		uni-navigator {
			position: relative;
			padding: 40rpx 50rpx;
			font-size: 28rpx;

			.item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 36rpx;
				font-weight: bold;
				text-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);

				image {
					width: 32rpx;
					height: 32rpx;
				}
			}

			.banner {
				display: block;
				margin: 30rpx 0;
			}
		}
	}
</style>